# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=tomlplusplus
pkgver=3.3.0
pkgrel=1
pkgdesc="Header-only TOML config file parser and serializer for C++17"
arch=(loong64 x86_64)
url="https://marzer.github.io/tomlplusplus/"
license=(MIT)
depends=(gcc-libs glibc)
makedepends=(cmake meson)
provides=(libtomlplusplus.so)
source=($pkgname-$pkgver.tar.gz::https://github.com/marzer/$pkgname/archive/refs/tags/v$pkgver.tar.gz)
sha512sums=('b3e9933719bdddca9c38ed269f90bccac59407c87f58a885e0ed818aee147758a7279c8c1406516ee95df92a2bde9dd3d6551faf2c84e537315871a9f1a1ff95')
b2sums=('26031acaa2a26006fdc8888764c3448d360df2251503d4fb044f8904277a6807fe8606bacff78689e0ba891d50e756ebb84fa5c086bf41c1723be64aa3459500')

build() {
  arch-meson $pkgname-$pkgver build
  ninja -C build
}

package() {
  meson install -C build --destdir "$pkgdir"
  install -vDm 644 $pkgname-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
